package com.spring.sunflower.common

import android.content.Intent
import android.os.Handler
import android.view.WindowManager
import com.spring.sunflower.R
import com.spring.sunflower.base.AppBaseActivity
import com.spring.sunflower.base.BaseCompatActivity
import com.spring.sunflower.dialog.OnPermissionIntroClickListener
import com.spring.sunflower.util.ActivityManager
import kotlin.system.exitProcess

/**
 * Created by Kevin on 2021/9/23<br/>
 *
 * Describe:<br/>
 */
class LogOutActivity : BaseCompatActivity() {
    override fun getLayoutID(): Int = R.layout.activity_logout
    override fun doSomethingBeforeOnCreate() {
        super.doSomethingBeforeOnCreate()
        window.setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN
        )
    }

    override fun initView() {
        showHelpDialog("温馨提示", "当前登录已失效，需要退出app重新进入才可以使用", object : OnPermissionIntroClickListener {
            override fun onClickCancel() {}
            override fun onClickOK() {
                forbiddenBackKey = false
                exitProcess(0)
            }
        })
//        Handler().postDelayed(Runnable {
//
//        }, 1000)
    }
}